<template>
  <view class="employee-detail">
    <!-- 顶部个人信息卡片 -->
    <view class="info-card">
      <view class="avatar-section">
        <image 
          src="/static/page_icons/my-mingchao.png"
          class="avatar"
          mode="aspectFill"
        />
        <text class="name">{{EmployeeList.username}}</text>
        <view class="tag-container">
          <text class="role-tag">{{EmployeeList.role}}</text>
          <text class="department-tag">{{EmployeeList.deptName}}</text>
        </view>
      </view>
      
      <view class="basic-info">
        <view class="info-item">
          <uni-icons type="person-filled" size="20" color="#3c9cff"></uni-icons>
          <text class="label">工号</text>
          <text class="value">{{EmployeeList.employeeId}}</text>
        </view>
        
        <view class="info-item">
          <uni-icons type="phone-filled" size="20" color="#3c9cff"></uni-icons>
          <text class="label">电话</text>
          <text class="value">{{EmployeeList.phoneNumber}}</text>
        </view>
        
        <view class="info-item">
          <uni-icons type="email-filled" size="20" color="#3c9cff"></uni-icons>
          <text class="label">邮箱</text>
          <text class="value">{{EmployeeList.email}}</text>
        </view>
      </view>
    </view>
    
    <!-- 详细信息列表 -->
    <view class="detail-list">
      <view class="list-title">个人信息</view>
      <view class="list-content">
        <view class="list-item">
          <text class="item-label">职位</text>
          <text class="item-value">{{EmployeeList.position}}</text>
        </view>
        <view class="list-item">
          <text class="item-label">年龄</text>
          <text class="item-value">{{EmployeeList.age}}岁</text>
        </view>
        <view class="list-item">
          <text class="item-label">生日</text>
          <text class="item-value">{{EmployeeList.birthday || '未设置'}}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        EmployeeList: ''
      };
    },
    onLoad(options) {
      this.EmployeeList = JSON.parse(options.info)
    },
     methods: {
       
      }
  }
</script>

<style lang="scss">
.employee-detail {
  min-height: 100vh;
  background-color: #f8f8f8;
  padding: 30rpx;
  
  .info-card {
    background-color: #ffffff;
    border-radius: 20rpx;
    padding: 40rpx;
    box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
    
    .avatar-section {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 40rpx;
      
      .avatar {
        width: 160rpx;
        height: 160rpx;
        border-radius: 80rpx;
        margin-bottom: 24rpx;
        border: 6rpx solid #f0f7ff;
      }
      
      .name {
        font-size: 40rpx;
        font-weight: 600;
        color: #333;
        margin-bottom: 16rpx;
      }
      
      .tag-container {
        display: flex;
        gap: 16rpx;
        
        .role-tag, .department-tag {
          font-size: 24rpx;
          padding: 6rpx 20rpx;
          border-radius: 30rpx;
        }
        
        .role-tag {
          background-color: #e8f4ff;
          color: #3c9cff;
        }
        
        .department-tag {
          background-color: #f0f9eb;
          color: #67c23a;
        }
      }
    }
    
    .basic-info {
      .info-item {
        display: flex;
        align-items: center;
        padding: 20rpx 0;
        border-bottom: 2rpx solid #f5f5f5;
        
        &:last-child {
          border-bottom: none;
        }
        
        .label {
          color: #666;
          margin: 0 20rpx;
          font-size: 28rpx;
          width: 80rpx;
        }
        
        .value {
          color: #333;
          font-size: 28rpx;
          flex: 1;
        }
      }
    }
  }
  
  .detail-list {
    margin-top: 30rpx;
    background-color: #ffffff;
    border-radius: 20rpx;
    overflow: hidden;
    box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
    
    .list-title {
      font-size: 32rpx;
      font-weight: 600;
      color: #333;
      padding: 30rpx;
      border-bottom: 2rpx solid #f5f5f5;
    }
    
    .list-content {
      .list-item {
        display: flex;
        justify-content: space-between;
        padding: 30rpx;
        border-bottom: 2rpx solid #f5f5f5;
        
        &:last-child {
          border-bottom: none;
        }
        
        .item-label {
          color: #666;
          font-size: 28rpx;
        }
        
        .item-value {
          color: #333;
          font-size: 28rpx;
        }
      }
    }
  }
}
</style> 
